<?php /* Smarty version Smarty-3.1.14, created on 2013-09-17 17:24:20
         compiled from "application/views/gameggk/gameggkshow.html" */ ?>
<?php /*%%SmartyHeaderCode:1921379468522956deb76387-58428915%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '0062bfa181ca32388e077d6fc2cc064e30d8839e' => 
    array (
      0 => 'application/views/gameggk/gameggkshow.html',
      1 => 1379409787,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1921379468522956deb76387-58428915',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_522956dec45388_95118937',
  'variables' => 
  array (
    'title' => 0,
    'data' => 0,
    'iserror' => 0,
    'errormessage' => 0,
    'iswin' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_522956dec45388_95118937')) {function content_522956dec45388_95118937($_smarty_tpl) {?><!DOCTYPE HTML><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <meta name="viewport" content="width=device-width,minimum-scale=1,user-scalable=no,maximum-scale=1,initial-scale=1" />        <meta name="apple-mobile-web-app-capable" content="yes" />        <meta name="apple-mobile-web-app-status-bar-style" content="black" />        <meta name="format-detection" content="telephone=no" />            <link rel="stylesheet" href="/application/public/css/game/common2.css" />        <link rel="stylesheet" href="/application/public/css/game/jquery.css" />        <link rel="stylesheet" href="/application/public/css/game/alertify.css" />        <style type="text/css">            .cover            {                width: 320px;                max-width: 480px;                margin: 0 auto;                position: relative;            }            .cover img            {                width: 320px;            }            #scratchpad, #prize, #winresult            {                position: absolute;                width: 150px;                height: 40px;                top: 110px;                right: 50px;                text-align: center;                font-weight: bold;                font-size: 20px;                line-height: 40px;            }            .btn-cont            {                position: absolute;                bottom: 3px;                right: 3px;                display: none;            }            .content            {                margin-top: 20px;                padding: 0 15px;            }            .content .desc            {                font-weight: bold;                border-bottom: 1px dashed #000;                padding: 12px 0px;            }            p            {                margin: 0 0 10px;                font-size: 14px;            }            .loading-mask            {                width: 100%;                height: 100%;                position: fixed;                background: rgba(0,0,0,0.6);                z-index: 100;                left: 0px;                top: 0px;            }        </style>        <title>在线游戏刮刮卡</title>        <script language="javascript" type="text/javascript" src="/application/public/js/jquery-1.7.1.js"></script>        <script type="text/javascript" src="/application/public/js/mobile.js"></script>    </head>    <body style="min-height: 776px;">        <div id="panelLottery">            <div class="cover">                <img src="/application/public/images/mobile_bg.jpg" height="208px">                <div id="prize">                    <?php echo $_smarty_tpl->tpl_vars['title']->value;?>
                </div>                <div id="winresult">                    <div style="position: relative; width: 150px; height: 40px; cursor: default;">                        <div id="winPrize" width="150" height="40" style="cursor: default;">                        </div>                    </div>                </div>                <div id="scratchpad">                    <div id="canvaspanel" style="position: relative; width: 150px; height: 40px; cursor: default;">                        <canvas id="canvas" width="150" height="40" style="cursor: default;"></canvas>                    </div>                </div>                <div style="display: block;" class="btn-cont" onclick="getPrize()">                    <a class="ui-btn ui-shadow ui-btn-corner-all ui-btn-up-c" data-theme="c" data-wrapperels="span"                       data-iconshadow="true" data-shadow="true" data-corners="true" href="javascript:;"                       id="opendialog" data-role="button" data-rel="dialog"><span class="ui-btn-inner ui-btn-corner-all">                            <span class="ui-btn-text">我要领奖</span></span></a>                </div>            </div>            <div class="content">                <p class="desc">                    兑奖说明<span style="color: red;">（亲，中奖后请务必点击"我要领奖"，否可能无法领奖喔！）</span></p>                <p>                <p>                    一等奖:<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['pname1'];?>
   数量：<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['pcount1'];?>
                </p>                <p>                    二等奖:<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['pname2'];?>
  数量：<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['pcount2'];?>
                </p>                <p>                    三等奖:<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['pname3'];?>
  数量：<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['pcount3'];?>
                </p>                <p>                    活动说明：<?php echo $_smarty_tpl->tpl_vars['data']->value[0]['intro'];?>
                     <br/>                </p>                <p>                                  </p>            </div>        </div>        <!--弹出框-->        <div id="promptMsg" class="ui-dialog-contain ui-corner-all ui-overlay-shadow" style="display: none">            <div class="ui-corner-top ui-header ui-bar-d">                <a title="Close" class="ui-btn-left ui-btn ui-shadow ui-btn-corner-all ui-btn-icon-notext ui-btn-up-d" href="#"><span class="ui-btn-inner ui-btn-corner-all"><span class="ui-btn-text">Close</span>                        <span class="ui-icon ui-icon-delete ui-icon-shadow">&nbsp;</span> </span>                </a>                <h3 class="ui-title">                    恭喜你！中奖了</h3>            </div>            <div class="ui-corner-bottom ui-content ui-body-c">                <p style="font-weight: bold;" id="ts" runat="server">                    您中的是<span><?php echo $_smarty_tpl->tpl_vars['title']->value;?>
</span>，您可以在【帐户信息】—【获奖信息】中查询,为了您更好的领取奖品，请在帐户信息完善您的信息!                </p>            </div>        </div>        <section id="alertEle" class="alertify-dialog is-alertify-dialog-showing" style="display: none;">            <div class="alertify-dialog-inner">                <article class="alertify-inner">                    <p class="alertify-message" id="alertEleMsg"></p>                    <nav class="alertify-buttons">                        <button id="alertify-ok" class="alertify-button alertify-button-ok" type="button" role="button" onclick="$('alertEle').style.display = 'none';">缁绢収鍠栭悾锟?button>                    </nav>                </article><a href="#" class="alertify-resetFocus" id="alertify-resetFocus">Reset Focus</a></div></section>        <div style="clear: both;">        </div        <p class="page-url">            <a href="#" target="_blank" class="page-url-link">此功能由"武林商圈"平台提供</a>        </p>        <script type="text/javascript">            window.onload = function() {                var IsError = "<?php echo $_smarty_tpl->tpl_vars['iserror']->value;?>
";                var msgout = "<?php echo $_smarty_tpl->tpl_vars['errormessage']->value;?>
";                if (IsError == "T")                {                    alert(msgout);                }            }            var c = document.getElementById("canvas");            var ctx = c.getContext("2d");            ctx.fillStyle = "#CCCCCC";            ctx.fillRect(0, 0, 150, 40);            var isGua = false; //闁哄嫷鍨伴幆浣割啅閼碱剛鐥呴柛鎺濆枛椤拷            // var FromUserName = "<<?php ?>%=FromUserName %<?php ?>>";            (function() {                var paint = {                    init: function() {                        this.load();                    },                    load: function() {                        this.x = []; //閻犱焦婢樼紞宥單楅悩宕囧灱缂佸顕ф慨鈺呭及椤栨粍鐣盭闁秆勫姈閻栵拷                        this.y = []; //閻犱焦婢樼紞宥單楅悩宕囧灱缂佸顕ф慨鈺呭及椤栨粍鐣盰闁秆勫姈閻栵拷                        this.clickDrag = [];                        this.lock = false; //濮捬呭У閻栵絿绮旂拠鎻捫楅柛鎾崇▌缁辨繈宕氶妶鍡樼劷濮捬呭У閻栵綁寮伴姘剨闁圭顦虹粭锟?                        this.isEraser = true;                        this.eraserRadius = 8; //闁瑰尅绠撳▍搴ㄥ础婵犲倻绐為柛濠忔嫹                         this.$ = function(id) {                            return typeof id == "string" ? document.getElementById(id) : id;                        };                        this.canvas = this.$("canvas");                        if (this.canvas.getContext) {                        } else {                            alert("您的浏览器不支持 canvas 标签");                            return;                        }                        this.cxt = this.canvas.getContext('2d');                        this.touch = ("createTouch" in document); //闁告帇鍊曢悾楣冨及椤栨碍鍎婂☉鎾跺劋婢ф粓骞愭担绛嬪晭濠㈣鎷?                        this.StartEvent = this.touch ? "touchstart" : "mousedown"; //闁猴拷鍨辩?鏃傛喆閿旇姤鍤嬬?顔肩箣婵炲洭鎮介妸褎绁查幖瀛樻⒒濞堟垶绂嶇?鈺傤偨闁哄洤銇橀崬锟?                        this.MoveEvent = this.touch ? "touchmove" : "mousemove";                        this.EndEvent = this.touch ? "touchend" : "mouseup";                        this.bind();                    },                    bind: function() {                        var t = this;                        /*鼠标按下事件，记录鼠标位置，并绘制，解锁lock，打开mousemove事件*/                        this.canvas['on' + t.StartEvent] = function(e) {                            var touch = t.touch ? e.touches[0] : e;                            position = x.getAbsoluteLocation('canvas');                            var _x = touch.clientX - position.left; //濮捬呭У閻栵綁宕烽妸褎鏆伴悽顖氬暕缁楀倿鎯冮崜搴ㄥ锤閹邦厾鍨奸柨娑樺娴滄帡鎮界拠鑼伌鐎归潻缂氱粭鍌滄喆閹哄秷绀嬮悹褔顥熼崑锟?                            var _y = touch.clientY - position.top; //濮捬呭У閻栵綁宕烽妸褎鏆伴悽顖氬暕缁楀倿鎯冮崜蹇涘锤閹邦厾鍨奸柨娑樺娴滄帡鎮界拠鑼伌鐎归潻缂氱粭鍌滄喆閹哄秷绀嬮悹褔顥熼崑锟?                            t.resetEraser(_x, _y);                            t.lock = true;                        };                        /*鼠标移动事件*/                        this.canvas['on' + t.MoveEvent] = function(e) {                            var touch = t.touch ? e.touches[0] : e;                            if (t.lock)//t.lock濞戞挾鐨猺ue闁告帗鐟︽晶鐣屾偘閿燂拷                            {                                position = x.getAbsoluteLocation('canvas');                                var _x = touch.clientX - position.left; //濮捬呭У閻栵綁宕烽妸褎鏆伴悽顖氬暕缁楀倿鎯冮崜搴ㄥ锤閹邦厾鍨奸柨娑樺娴滄帡鎮界拠鑼伌鐎归潻缂氱粭鍌滄喆閹哄秷绀嬮悹褔顥熼崑锟?                                var _y = touch.clientY - position.top; //濮捬呭У閻栵綁宕烽妸褎鏆伴悽顖氬暕缁楀倿鎯冮崜蹇涘锤閹邦厾鍨奸柨娑樺娴滄帡鎮界拠鑼伌鐎归潻缂氱粭鍌滄喆閹哄秷绀嬮悹褔顥熼崑锟?                                t.resetEraser(_x, _y);                            }                        };                        this.canvas['on' + t.EndEvent] = function(e) {                            /*重置数据*/                            t.lock = false;                            t.x = [];                            t.y = [];                            t.clickDrag = [];                            clearInterval(t.Timer);                            t.Timer = null;                        };                    },                    resetEraser: function(_x, _y) {                        /*使用橡皮擦-提醒*/                        var t = this;                        //this.cxt.lineWidth = 30;                        /*source-over 默认,相交部分由后绘制图形的填充(颜色,渐变,纹理)覆盖,全部浏览器通过*/                        t.cxt.globalCompositeOperation = "destination-out";                        t.cxt.beginPath();                        t.cxt.arc(_x, _y, t.eraserRadius, 0, Math.PI * 1);                        t.cxt.strokeStyle = "rgba(250,250,250,0)";                        t.cxt.fill();                        t.cxt.globalCompositeOperation = "source-over"                        //alert('1');                        isGua = true;                    }                };                paint.init();            })();            function getPrize() {                // check();                var IsWin = "<?php echo $_smarty_tpl->tpl_vars['iswin']->value;?>
";                if (!isGua) {                    alert('请先刮开挂奖层');                    return;                }                if (IsWin == "T") {                    $('promptMsg').style.display = 'block';                    $('panelLottery').style.display = 'none';                }                else {                    alert('您本次没有中奖');                    location.reload();                }            }            function alert_t(msg) {                $('alertEleMsg').innerHTML = msg;                $('alertEle').style.display = 'block';            }            function check() {                $.get("ajax/CheckTime.ashx?FromUserName=" + FromUserName + "&T=" + Math.random(), function(e) {                    var ss = e                    if (ss == "1") {                        alert("您今天抽奖次数已到！请明天再来！");                        location.reload();                        return;                    }                });            }        </script>    </body></html><?php }} ?>